package Demo4;

import java.awt.*;

public class drawShape {
    public static void draw(){
        //创建了一个Shape数组
//        Shape[] shapes={new Cycle(),new Rect(),new Cycle(),new Rect(),new Flower()};
//        for (Shape shape:shapes){
//            shape.draw();
//        }
//
//        Rect rect=new Rect();
//        Cycle cycle=new Cycle();
//        Flower flower=new Flower();
//        String[] shapes={"cycle","rect","cycle","rect","flower"};
//
//        for (String shape:shapes){
//            if (shape.equals("cycle")){
//                cycle.draw();
//            } else if (shape.equals("recr")) {
//                rect.draw();
//            } else if (shape.equals("flower")) {
//                flower.draw();
//            }
//        }
    }
}
